import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wangxin
 * Date: 2024-10-18
 * Time: 10:39
 */
public class test1 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int len = s.length();
        char[] c = new char[len];
        int j=1,res=0;
        for(int i=0;i<len;i++){
            c[i]=s.charAt(i);
            if(s.charAt(i)!='-' && i <len-1){
                res +=(c[i]-'0')*j;
                j++;
            }
        }
        res = res%11;
        if(res==10){
            if(s.charAt(len-1)=='X'){
                System.out.println("Right");
            }
            else{
                c[len-1]='X';
                System.out.println(c);
            }
        }
        else{
            if(s.charAt(len-1)==(res+'0')){
                System.out.println("Right");
            }
            else{
                String str=Integer.toString(res);
                c[len-1]=str.charAt(0);
                System.out.println(c);
            }
        }
    }
}
